<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="org.apache.shiro.web.filter.authc.FormAuthenticationFilter"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
 	 <meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>${fns:getConfig('productName')} 登录</title>
	<meta name="author" content="DeathGhost" />
	<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" type="text/css" href="${ctxStatic }/loginStatic/css/style.css" />
	<style>
		body{height:100%;background:#1d2f3b;overflow:hidden;}
		canvas{z-index:-1;position:absolute;}
		.header{height:80px;padding-top:20px;} .alert{position:relative;width:300px;margin:0 auto;*padding-bottom:0px;}
		.form-signin{position:relative;text-align:left;width:auto;margin:0 auto 20px;
        		-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05);}
	</style>
    
	<script type="text/javascript">
		$(document).ready(function() {
			 $('body').particleground({
			    /* dotColor: '#5cbdaa',
			    lineColor: '#5cbdaa' */
			    dotColor: '#91bfbf',
			    lineColor: '#91bfbf'
			  });
			$("#loginForm").validate({
				rules: {
					validateCode: {remote: "${pageContext.request.contextPath}/servlet/validateCodeServlet"}
				},
				messages: {
					username: {required: "请填写用户名."},password: {required: "请填写密码."},
					validateCode: {remote: "验证码不正确.", required: "请填写验证码."}
				},
				errorLabelContainer: "#messageBox",
				errorPlacement: function(error, element) {
					error.appendTo($("#loginError").parent());
				} 
			});
		});
		// 如果在框架或在对话框中，则弹出提示并跳转到首页
		if(self.frameElement && self.frameElement.tagName == "IFRAME" || $('#left').length > 0 || $('.jbox').length > 0){
			alert('未登录或登录超时。请重新登录，谢谢！');
			top.location = "${ctx}";
		}
	</script>
</head>
<body class="hold-transition login-page" style="height:100%;background:#1d2f3b;overflow:hidden;">
<div class="header">
	<div id="messageBox" class="alert alert-error ${empty message ? 'hide' : ''}"><button data-dismiss="alert" class="close">×</button>
		<label id="loginError" class="error">${message}</label>
	</div>
</div>
<div class="login-box-body   admin_login">
		<div class="login-logo">
			<a href="${fns:getConfig('companyInterUrl') }">
				<b>${fns:getConfig('productName')}</b>
			</a>
		</div>
		<p class="login-box-msg">
					  <%-- admin_login<strong>${fns:getConfig('productName')}</strong> --%>
					  <a href="${fns:getConfig('companyInterUrl') }"><em>公司官网</em></a>
		</p>
	 	<form id="loginForm" action="${ctx}/login" method="post">
				 
				 <div class="form-group has-feedback">
					 	 <input class="form-control"  type="text" id="username" name="username" placeholder="账号" class="login_txtbx"  value="${username}">
				 </div>
				 <div class="form-group has-feedback">
					  	<input class="form-control" type="password" id="password" name="password" placeholder="密码" class="login_txtbx">
				 </div>
		 		<c:if test="${isValidateCodeLogin}"><div class="form-group has-feedback">
				    	<div class="checkcode">
							<sys:validateCode name="validateCode" inputCssStyle="margin-bottom:0;"/>
						</div>
				 </div></c:if>
				 <div class="row">
				 		<div class="col-xs-4">
				          <button type="submit" class="btn btn-primary btn-block btn-flat">登 录</button>
				        </div>
					  	<!-- <input class="btn btn-primary btn-block btn-flat" type="submit" value="登 录"/> -->
				 </div>
				 <div class="social-auth-links text-center">
				 	  	<p>Copyright &copy; 2016-${fns:getConfig('copyrightYear')} 版权所有</p>
			  			<p>${fns:getConfig('copyrightCode')}</p>
				 </div>
				<%--  <dd>
					  <p>Copyright &copy; 2016-${fns:getConfig('copyrightYear')} 版权所有</p>
					  <p>${fns:getConfig('copyrightCode')}</p>
				 </dd> --%>
				</div>
	 	</form>

	<!--[if lte IE 6]><br/><div class='alert alert-block' style="text-align:left;padding-bottom:10px;"><a class="close" data-dismiss="alert">x</a><h4>温馨提示：</h4><p>你使用的浏览器版本过低。为了获得更好的浏览体验，我们强烈建议您 <a href="http://browsehappy.com" target="_blank">升级</a> 到最新版本的IE浏览器，或者使用较新版本的 Chrome、Firefox、Safari 等。</p></div><![endif]-->
	<%-- <div class="header">
		<div id="messageBox" class="alert alert-error ${empty message ? 'hide' : ''}"><button data-dismiss="alert" class="close">×</button>
			<label id="loginError" class="error">${message}</label>
		</div>
	</div>
	<h1 class="form-signin-heading">${fns:getConfig('productName')}</h1>
	<form id="loginForm" class="form-signin" action="${ctx}/login" method="post">
		<label class="input-label" for="username">登录名</label>
		<input type="text" id="username" name="username" class="input-block-level required" value="${username}">
		<label class="input-label" for="password">密码</label>
		<input type="password" id="password" name="password" class="input-block-level required">
		<c:if test="${isValidateCodeLogin}"><div class="validateCode">
			<label class="input-label mid" for="validateCode">验证码</label>
			<sys:validateCode name="validateCode" inputCssStyle="margin-bottom:0;"/>
		</div></c:if>
		<label for="mobile" title="手机登录"><input type="checkbox" id="mobileLogin" name="mobileLogin" ${mobileLogin ? 'checked' : ''}/></label>
		<input class="btn btn-large btn-primary" type="submit" value="登 录"/>&nbsp;&nbsp;
		<label for="rememberMe" title="下次不需要再登录"><input type="checkbox" id="rememberMe" name="rememberMe" ${rememberMe ? 'checked' : ''}/> 记住我（公共场所慎用）</label>
		<div id="themeSwitch" class="dropdown">
			<a class="dropdown-toggle" data-toggle="dropdown" href="#">${fns:getDictLabel(cookie.theme.value,'theme','默认主题')}<b class="caret"></b></a>
			<ul class="dropdown-menu">
			  <c:forEach items="${fns:getDictList('theme')}" var="dict"><li><a href="#" onclick="location='${pageContext.request.contextPath}/theme/${dict.value}?url='+location.href">${dict.label}</a></li></c:forEach>
			</ul>
			<!--[if lte IE 6]><script type="text/javascript">$('#themeSwitch').hide();</script><![endif]-->
		</div>
	</form> --%>
	<%-- <div class="footer">
		Copyright &copy; 2012-${fns:getConfig('copyrightYear')} <a href="${pageContext.request.contextPath}${fns:getFrontPath()}">${fns:getConfig('productName')}</a> - Powered By <a href="http://jeesite.com" target="_blank">JeeSite</a> ${fns:getConfig('version')} 
	</div>
	<script src="${ctxStatic}/flash/zoom.min.js" type="text/javascript"></script> --%>
	
	<!-- jQuery 2.2.3 -->
<script src="${adminLET }/plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="${adminLET }/bootstrap/js/bootstrap.min.js"></script>
<!-- iCheck -->
<script src="${adminLET }/plugins/iCheck/icheck.min.js"></script>
<script>
  $(function () {
    $('input').iCheck({
      checkboxClass: 'icheckbox_square-blue',
      radioClass: 'iradio_square-blue',
      increaseArea: '20%' // optional
    });
  });
</script>
	<script src="${ctxStatic}/loginStatic/js/jquery.js"></script>
	<script src="${ctxStatic}/loginStatic/js/verificationNumbers.js"></script>
	<script src="${ctxStatic}/loginStatic/js/Particleground.js"></script>
	<script type="text/javascript">
		$(function(){
			 $('body').particleground({
			    /* dotColor: '#5cbdaa',
			    lineColor: '#5cbdaa' */
			    dotColor: '#91bfbf',
			    lineColor: '#91bfbf'
			  });
		})
	
	</script>
</body>
</html>